package com.shitou.shitoumember.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * class detail:
 *  rabbitMQ配置类
 * @author 石头人
 */
@SuppressWarnings("all")
@Configuration
@Component
public class RabbitMQConfig {

    public final static String MEMBER_OPTION_QUEUE = "MEMBER-OPTION-QUEUE";
    public final static String SEND_MESSAGAING_QUEUE = "SEND-MESSAGING-QUEUE";
    public final static String CONNECTION_MEMBER_QUEUE = "CONNECTION-MEMBER-QUEUE";

    @Bean(MEMBER_OPTION_QUEUE)
    public Queue optionQueue(){
        return new Queue(MEMBER_OPTION_QUEUE, true, false, false, null);
    }

    @Bean(SEND_MESSAGAING_QUEUE)
    public Queue messagingQueue(){
        return new Queue(SEND_MESSAGAING_QUEUE, true, false, false, null);
    }

    @Bean(CONNECTION_MEMBER_QUEUE)
    public Queue connectionQueue(){
        return new Queue(CONNECTION_MEMBER_QUEUE, true, false, false, null);
    }



}
